package com.cn.longdistancebusstation.home;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.webkit.WebView;

import com.cn.longdistancebusstation.R;
import com.cn.longdistancebusstation.base.BaseActivity;

public class NewsDetailActivity extends BaseActivity {

    private WebView mWebView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news_detail);
        this.getTitleTextView().setText("详情");
        mWebView = (WebView)findViewById(R.id.webView);
        loadWebContent();
    }

    private void loadWebContent(){
        Intent intent = getIntent();
        String strWebContent = intent.getStringExtra("content");
        strWebContent = Html.fromHtml(strWebContent).toString();
        mWebView.loadDataWithBaseURL(null, strWebContent,"text/html", "UTF-8", null);
    }
}
